package cn.linran.org.domain;

import cn.linran.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 部门
 */
@Data
@AllArgsConstructor  // 有参构造
@NoArgsConstructor // 无参构造
public class Department extends BaseDomain {
    // 编号
    private String sn;
    // 名称
    private String name;
    // 上级部门路径
    private String dirPath;
    // 状态
    private Integer state;
    // 部门领导id  (employee)
    private Long manager_id;
    // employee对象  领导  manager_id
    private Employee manager;
    // 上级部门id
    private Long parent_id;
    private Department parent;
    // 子集部门
    //部门树最后一级没有数据就不显示
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    List<Department> children = new ArrayList<>();



}
